import base from "./base"; // 导入接口域名列表
import axios from "../http"; // 导入http中创建的axios实例
import qs from "qs"; // 根据需求是否导入qs模块
const getNews = {
  getNewsList(params) {
    return axios.post(`${base.bd}/admin/news/lists`, qs.stringify(params));
  },
  addNews(params) {
    return axios.post(`${base.bd}/admin/news/saveadd`, qs.stringify(params));
  },
  deleteNews(params) {
    return axios.post(`${base.bd}/admin/news/del`, qs.stringify(params));
  },
  selectNews(params) {
    return axios.post(`${base.bd}/admin/news/edit`, qs.stringify(params));
  },
  updateNew(params) {
    return axios.post(`${base.bd}/admin/news/saveedit`, qs.stringify(params));
  },
  deleteNewsAll(params) {
    return axios.post(`${base.bd}/admin/news/del_all`, qs.stringify(params));
  },
  getPacketList(params) {
    return axios.post(`${base.bd}/admin/packet/lists`, qs.stringify(params));
  },
  PacketDetail(params) {
    return axios.post(`${base.bd}/admin/packet/edit`, qs.stringify(params));
  },
  PacketSaveAdd(params) {
    return axios.post(`${base.bd}/admin/packet/saveadd`, qs.stringify(params));
  },
  packetSaveEdit(params) {
    return axios.post(`${base.bd}/admin/packet/saveedit`, qs.stringify(params));
  },
  PacketDel(params) {
    return axios.post(`${base.bd}/admin/packet/del_all`, qs.stringify(params));
  },
  getCouponList(params) {
    return axios.post(`${base.bd}/admin/coupon/lists`, qs.stringify(params));
  },
  CouponDel(params) {
    return axios.post(`${base.bd}/admin/coupon/del`, qs.stringify(params));
  },
  coupon_edit(params) {
    return axios.post(`${base.bd}/admin/coupon/edit`, qs.stringify(params));
  },
  getCouponOption(params) {
    return axios.post(`${base.bd}/admin/packet/coupon_option`, qs.stringify(params));
  },
  copy_news(params) {
    return axios.post(`${base.bd}/admin/news/copy_news`, qs.stringify(params));
  },
  packetAdd(params){
    return axios.post(`${base.bd}/admin/coupon/addsave`, qs.stringify(params));
  },
  news_comment_lists(params){
    return axios.post(`${base.bd}/admin/news_comment/lists`, qs.stringify(params));
  },
  news_comment_del(params){
    return axios.post(`${base.bd}/admin/news_comment/del`, qs.stringify(params));
  },
};
export default getNews;
